using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace MapaMovil
{
    public partial class FormAgregarArea : Form
    {
        private FormPrincipal fm;
        /* Cambio de FormMapa a FormCarros*/
        public FormAgregarArea(FormPrincipal f)
        {
            InitializeComponent();
            fm = f;
        }

        private void buttonAddArea_Click(object sender, EventArgs e)
        {
            fm.insertAreaFromStack(textBoxName.Text, textBoxType.Text);
            fm = null;
            this.Close();
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            fm.buttonInsertAreaCancel_Click(null, null);
            fm = null;
            this.Close();
            
        }
    }
}